3.5.45 \(\int (a+a \sin (e+f x))^3 (c+d \sin (e+f x))^2 \, dx\) [445]

Optimal. Leaf size=164 \[ \frac {1}{8} a^3 \left (20 c^2+30 c d+13 d^2\right ) x-\frac {4 a^3 (c+d)^2 \cos (e+f x)}{f}+\frac {a^3 \left (c^2+6 c d+5 d^2\right ) \cos ^3(e+f x)}{3 f}-\frac {a^3 d^2 \cos ^5(e+f x)}{5 f}-\frac {a^3 \left (12 c^2+30 c d+13 d^2\right ) \cos (e+f x) \sin (e+f x)}{8 f}-\frac {a^3 d (2 c+3 d) \cos (e+f x) \sin ^3(e+f x)}{4 f} \]

[Out]

1/8*a^3*(20*c^2+30*c*d+13*d^2)*x-4*a^3*(c+d)^2*cos(f*x+e)/f+1/3*a^3*(c^2+6*c*d+5*d^2)*cos(f*x+e)^3/f-1/5*a^3*d
^2*cos(f*x+e)^5/f-1/8*a^3*(12*c^2+30*c*d+13*d^2)*cos(f*x+e)*sin(f*x+e)/f-1/4*a^3*d*(2*c+3*d)*cos(f*x+e)*sin(f*
x+e)^3/f

________________________________________________________________________________________

Rubi [A]
time = 0.18, antiderivative size = 189, normalized size of antiderivative = 1.15, number of steps used = 9, number of rules used = 7, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {2840, 2830, 2724, 2718, 2715, 8, 2713} \begin {gather*} \frac {a^3 \left (20 c^2+30 c d+13 d^2\right ) \cos ^3(e+f x)}{60 f}-\frac {a^3 \left (20 c^2+30 c d+13 d^2\right ) \cos (e+f x)}{5 f}-\frac {3 a^3 \left (20 c^2+30 c d+13 d^2\right ) \sin (e+f x) \cos (e+f x)}{40 f}+\frac {1}{8} a^3 x \left (20 c^2+30 c d+13 d^2\right )-\frac {d (10 c-d) \cos (e+f x) (a \sin (e+f x)+a)^3}{20 f}-\frac {d^2 \cos (e+f x) (a \sin (e+f x)+a)^4}{5 a f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + a*Sin[e + f*x])^3*(c + d*Sin[e + f*x])^2,x]

[Out]

(a^3*(20*c^2 + 30*c*d + 13*d^2)*x)/8 - (a^3*(20*c^2 + 30*c*d + 13*d^2)*Cos[e + f*x])/(5*f) + (a^3*(20*c^2 + 30
*c*d + 13*d^2)*Cos[e + f*x]^3)/(60*f) - (3*a^3*(20*c^2 + 30*c*d + 13*d^2)*Cos[e + f*x]*Sin[e + f*x])/(40*f) -
((10*c - d)*d*Cos[e + f*x]*(a + a*Sin[e + f*x])^3)/(20*f) - (d^2*Cos[e + f*x]*(a + a*Sin[e + f*x])^4)/(5*a*f)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2713

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rule 2718

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 2724

Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Int[ExpandTrig[(a + b*sin[c + d*x])^n, x], x] /;
 FreeQ[{a, b, c, d, n}, x] && EqQ[a^2 - b^2, 0] && IGtQ[n, 0]

Rule 2830

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d
)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/(f*(m + 1))), x] + Dist[(a*d*m + b*c*(m + 1))/(b*(m + 1)), Int[(a + b*S
in[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] &&  !LtQ[m
, -2^(-1)]

Rule 2840

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[(-
d^2)*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Dist[1/(b*(m + 2)), Int[(a + b*Sin[e + f*
x])^m*Simp[b*(d^2*(m + 1) + c^2*(m + 2)) - d*(a*d - 2*b*c*(m + 2))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c,
 d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] &&  !LtQ[m, -1]

Rubi steps

\begin {align*} \int (a+a \sin (e+f x))^3 (c+d \sin (e+f x))^2 \, dx &=-\frac {d^2 \cos (e+f x) (a+a \sin (e+f x))^4}{5 a f}+\frac {\int (a+a \sin (e+f x))^3 \left (a \left (5 c^2+4 d^2\right )+a (10 c-d) d \sin (e+f x)\right ) \, dx}{5 a}\\ &=-\frac {(10 c-d) d \cos (e+f x) (a+a \sin (e+f x))^3}{20 f}-\frac {d^2 \cos (e+f x) (a+a \sin (e+f x))^4}{5 a f}+\frac {1}{20} \left (20 c^2+30 c d+13 d^2\right ) \int (a+a \sin (e+f x))^3 \, dx\\ &=-\frac {(10 c-d) d \cos (e+f x) (a+a \sin (e+f x))^3}{20 f}-\frac {d^2 \cos (e+f x) (a+a \sin (e+f x))^4}{5 a f}+\frac {1}{20} \left (20 c^2+30 c d+13 d^2\right ) \int \left (a^3+3 a^3 \sin (e+f x)+3 a^3 \sin ^2(e+f x)+a^3 \sin ^3(e+f x)\right ) \, dx\\ &=\frac {1}{20} a^3 \left (20 c^2+30 c d+13 d^2\right ) x-\frac {(10 c-d) d \cos (e+f x) (a+a \sin (e+f x))^3}{20 f}-\frac {d^2 \cos (e+f x) (a+a \sin (e+f x))^4}{5 a f}+\frac {1}{20} \left (a^3 \left (20 c^2+30 c d+13 d^2\right )\right ) \int \sin ^3(e+f x) \, dx+\frac {1}{20} \left (3 a^3 \left (20 c^2+30 c d+13 d^2\right )\right ) \int \sin (e+f x) \, dx+\frac {1}{20} \left (3 a^3 \left (20 c^2+30 c d+13 d^2\right )\right ) \int \sin ^2(e+f x) \, dx\\ &=\frac {1}{20} a^3 \left (20 c^2+30 c d+13 d^2\right ) x-\frac {3 a^3 \left (20 c^2+30 c d+13 d^2\right ) \cos (e+f x)}{20 f}-\frac {3 a^3 \left (20 c^2+30 c d+13 d^2\right ) \cos (e+f x) \sin (e+f x)}{40 f}-\frac {(10 c-d) d \cos (e+f x) (a+a \sin (e+f x))^3}{20 f}-\frac {d^2 \cos (e+f x) (a+a \sin (e+f x))^4}{5 a f}+\frac {1}{40} \left (3 a^3 \left (20 c^2+30 c d+13 d^2\right )\right ) \int 1 \, dx-\frac {\left (a^3 \left (20 c^2+30 c d+13 d^2\right )\right ) \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (e+f x)\right )}{20 f}\\ &=\frac {1}{8} a^3 \left (20 c^2+30 c d+13 d^2\right ) x-\frac {a^3 \left (20 c^2+30 c d+13 d^2\right ) \cos (e+f x)}{5 f}+\frac {a^3 \left (20 c^2+30 c d+13 d^2\right ) \cos ^3(e+f x)}{60 f}-\frac {3 a^3 \left (20 c^2+30 c d+13 d^2\right ) \cos (e+f x) \sin (e+f x)}{40 f}-\frac {(10 c-d) d \cos (e+f x) (a+a \sin (e+f x))^3}{20 f}-\frac {d^2 \cos (e+f x) (a+a \sin (e+f x))^4}{5 a f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.48, size = 177, normalized size = 1.08 \begin {gather*} -\frac {a^3 \cos (e+f x) \left (30 \left (20 c^2+30 c d+13 d^2\right ) \sin ^{-1}\left (\frac {\sqrt {1-\sin (e+f x)}}{\sqrt {2}}\right )+\sqrt {\cos ^2(e+f x)} \left (8 \left (55 c^2+90 c d+38 d^2\right )+15 \left (12 c^2+30 c d+13 d^2\right ) \sin (e+f x)+8 \left (5 c^2+30 c d+19 d^2\right ) \sin ^2(e+f x)+30 d (2 c+3 d) \sin ^3(e+f x)+24 d^2 \sin ^4(e+f x)\right )\right )}{120 f \sqrt {\cos ^2(e+f x)}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + a*Sin[e + f*x])^3*(c + d*Sin[e + f*x])^2,x]

[Out]

-1/120*(a^3*Cos[e + f*x]*(30*(20*c^2 + 30*c*d + 13*d^2)*ArcSin[Sqrt[1 - Sin[e + f*x]]/Sqrt[2]] + Sqrt[Cos[e +
f*x]^2]*(8*(55*c^2 + 90*c*d + 38*d^2) + 15*(12*c^2 + 30*c*d + 13*d^2)*Sin[e + f*x] + 8*(5*c^2 + 30*c*d + 19*d^
2)*Sin[e + f*x]^2 + 30*d*(2*c + 3*d)*Sin[e + f*x]^3 + 24*d^2*Sin[e + f*x]^4)))/(f*Sqrt[Cos[e + f*x]^2])

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(318\) vs. \(2(154)=308\).
time = 0.40, size = 319, normalized size = 1.95 Too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+a*sin(f*x+e))^3*(c+d*sin(f*x+e))^2,x,method=_RETURNVERBOSE)

[Out]

1/f*(-1/3*a^3*c^2*(2+sin(f*x+e)^2)*cos(f*x+e)+2*a^3*c*d*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x
+3/8*e)-1/5*a^3*d^2*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+3*a^3*c^2*(-1/2*cos(f*x+e)*sin(f*x+e)+1/2*f
*x+1/2*e)-2*a^3*c*d*(2+sin(f*x+e)^2)*cos(f*x+e)+3*a^3*d^2*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f
*x+3/8*e)-3*a^3*c^2*cos(f*x+e)+6*a^3*c*d*(-1/2*cos(f*x+e)*sin(f*x+e)+1/2*f*x+1/2*e)-a^3*d^2*(2+sin(f*x+e)^2)*c
os(f*x+e)+a^3*c^2*(f*x+e)-2*a^3*c*d*cos(f*x+e)+a^3*d^2*(-1/2*cos(f*x+e)*sin(f*x+e)+1/2*f*x+1/2*e))

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 332 vs. \(2 (161) = 322\).
time = 0.33, size = 332, normalized size = 2.02 \begin {gather*} \frac {160 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{3} c^{2} + 360 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} c^{2} + 480 \, {\left (f x + e\right )} a^{3} c^{2} + 960 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{3} c d + 30 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} c d + 720 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} c d - 32 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} a^{3} d^{2} + 480 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{3} d^{2} + 45 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} d^{2} + 120 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{3} d^{2} - 1440 \, a^{3} c^{2} \cos \left (f x + e\right ) - 960 \, a^{3} c d \cos \left (f x + e\right )}{480 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(c+d*sin(f*x+e))^2,x, algorithm="maxima")

[Out]

1/480*(160*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^3*c^2 + 360*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^3*c^2 + 480*(f*x
 + e)*a^3*c^2 + 960*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^3*c*d + 30*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2
*f*x + 2*e))*a^3*c*d + 720*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^3*c*d - 32*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3
 + 15*cos(f*x + e))*a^3*d^2 + 480*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^3*d^2 + 45*(12*f*x + 12*e + sin(4*f*x +
4*e) - 8*sin(2*f*x + 2*e))*a^3*d^2 + 120*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^3*d^2 - 1440*a^3*c^2*cos(f*x + e)
- 960*a^3*c*d*cos(f*x + e))/f

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 186, normalized size = 1.13 \begin {gather*} -\frac {24 \, a^{3} d^{2} \cos \left (f x + e\right )^{5} - 40 \, {\left (a^{3} c^{2} + 6 \, a^{3} c d + 5 \, a^{3} d^{2}\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left (20 \, a^{3} c^{2} + 30 \, a^{3} c d + 13 \, a^{3} d^{2}\right )} f x + 480 \, {\left (a^{3} c^{2} + 2 \, a^{3} c d + a^{3} d^{2}\right )} \cos \left (f x + e\right ) - 15 \, {\left (2 \, {\left (2 \, a^{3} c d + 3 \, a^{3} d^{2}\right )} \cos \left (f x + e\right )^{3} - {\left (12 \, a^{3} c^{2} + 34 \, a^{3} c d + 19 \, a^{3} d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{120 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(c+d*sin(f*x+e))^2,x, algorithm="fricas")

[Out]

-1/120*(24*a^3*d^2*cos(f*x + e)^5 - 40*(a^3*c^2 + 6*a^3*c*d + 5*a^3*d^2)*cos(f*x + e)^3 - 15*(20*a^3*c^2 + 30*
a^3*c*d + 13*a^3*d^2)*f*x + 480*(a^3*c^2 + 2*a^3*c*d + a^3*d^2)*cos(f*x + e) - 15*(2*(2*a^3*c*d + 3*a^3*d^2)*c
os(f*x + e)^3 - (12*a^3*c^2 + 34*a^3*c*d + 19*a^3*d^2)*cos(f*x + e))*sin(f*x + e))/f

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 702 vs. \(2 (153) = 306\).
time = 0.44, size = 702, normalized size = 4.28 \begin {gather*} \begin {cases} \frac {3 a^{3} c^{2} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {3 a^{3} c^{2} x \cos ^{2}{\left (e + f x \right )}}{2} + a^{3} c^{2} x - \frac {a^{3} c^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {3 a^{3} c^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {2 a^{3} c^{2} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {3 a^{3} c^{2} \cos {\left (e + f x \right )}}{f} + \frac {3 a^{3} c d x \sin ^{4}{\left (e + f x \right )}}{4} + \frac {3 a^{3} c d x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{2} + 3 a^{3} c d x \sin ^{2}{\left (e + f x \right )} + \frac {3 a^{3} c d x \cos ^{4}{\left (e + f x \right )}}{4} + 3 a^{3} c d x \cos ^{2}{\left (e + f x \right )} - \frac {5 a^{3} c d \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{4 f} - \frac {6 a^{3} c d \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {3 a^{3} c d \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{4 f} - \frac {3 a^{3} c d \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {4 a^{3} c d \cos ^{3}{\left (e + f x \right )}}{f} - \frac {2 a^{3} c d \cos {\left (e + f x \right )}}{f} + \frac {9 a^{3} d^{2} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {9 a^{3} d^{2} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {a^{3} d^{2} x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {9 a^{3} d^{2} x \cos ^{4}{\left (e + f x \right )}}{8} + \frac {a^{3} d^{2} x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {a^{3} d^{2} \sin ^{4}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {15 a^{3} d^{2} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {4 a^{3} d^{2} \sin ^{2}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {3 a^{3} d^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {9 a^{3} d^{2} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} - \frac {a^{3} d^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {8 a^{3} d^{2} \cos ^{5}{\left (e + f x \right )}}{15 f} - \frac {2 a^{3} d^{2} \cos ^{3}{\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (c + d \sin {\left (e \right )}\right )^{2} \left (a \sin {\left (e \right )} + a\right )^{3} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))**3*(c+d*sin(f*x+e))**2,x)

[Out]

Piecewise((3*a**3*c**2*x*sin(e + f*x)**2/2 + 3*a**3*c**2*x*cos(e + f*x)**2/2 + a**3*c**2*x - a**3*c**2*sin(e +
 f*x)**2*cos(e + f*x)/f - 3*a**3*c**2*sin(e + f*x)*cos(e + f*x)/(2*f) - 2*a**3*c**2*cos(e + f*x)**3/(3*f) - 3*
a**3*c**2*cos(e + f*x)/f + 3*a**3*c*d*x*sin(e + f*x)**4/4 + 3*a**3*c*d*x*sin(e + f*x)**2*cos(e + f*x)**2/2 + 3
*a**3*c*d*x*sin(e + f*x)**2 + 3*a**3*c*d*x*cos(e + f*x)**4/4 + 3*a**3*c*d*x*cos(e + f*x)**2 - 5*a**3*c*d*sin(e
 + f*x)**3*cos(e + f*x)/(4*f) - 6*a**3*c*d*sin(e + f*x)**2*cos(e + f*x)/f - 3*a**3*c*d*sin(e + f*x)*cos(e + f*
x)**3/(4*f) - 3*a**3*c*d*sin(e + f*x)*cos(e + f*x)/f - 4*a**3*c*d*cos(e + f*x)**3/f - 2*a**3*c*d*cos(e + f*x)/
f + 9*a**3*d**2*x*sin(e + f*x)**4/8 + 9*a**3*d**2*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + a**3*d**2*x*sin(e + f*
x)**2/2 + 9*a**3*d**2*x*cos(e + f*x)**4/8 + a**3*d**2*x*cos(e + f*x)**2/2 - a**3*d**2*sin(e + f*x)**4*cos(e +
f*x)/f - 15*a**3*d**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 4*a**3*d**2*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) -
 3*a**3*d**2*sin(e + f*x)**2*cos(e + f*x)/f - 9*a**3*d**2*sin(e + f*x)*cos(e + f*x)**3/(8*f) - a**3*d**2*sin(e
 + f*x)*cos(e + f*x)/(2*f) - 8*a**3*d**2*cos(e + f*x)**5/(15*f) - 2*a**3*d**2*cos(e + f*x)**3/f, Ne(f, 0)), (x
*(c + d*sin(e))**2*(a*sin(e) + a)**3, True))

________________________________________________________________________________________

Giac [A]
time = 0.47, size = 251, normalized size = 1.53 \begin {gather*} -\frac {a^{3} d^{2} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} - \frac {2 \, a^{3} c d \cos \left (f x + e\right )}{f} - \frac {a^{3} d^{2} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} + \frac {3}{8} \, {\left (4 \, a^{3} c^{2} + 10 \, a^{3} c d + 3 \, a^{3} d^{2}\right )} x + \frac {1}{2} \, {\left (2 \, a^{3} c^{2} + a^{3} d^{2}\right )} x + \frac {{\left (4 \, a^{3} c^{2} + 24 \, a^{3} c d + 17 \, a^{3} d^{2}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac {{\left (30 \, a^{3} c^{2} + 36 \, a^{3} c d + 23 \, a^{3} d^{2}\right )} \cos \left (f x + e\right )}{8 \, f} + \frac {{\left (2 \, a^{3} c d + 3 \, a^{3} d^{2}\right )} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} - \frac {{\left (3 \, a^{3} c^{2} + 8 \, a^{3} c d + 3 \, a^{3} d^{2}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+a*sin(f*x+e))^3*(c+d*sin(f*x+e))^2,x, algorithm="giac")

[Out]

-1/80*a^3*d^2*cos(5*f*x + 5*e)/f - 2*a^3*c*d*cos(f*x + e)/f - 1/4*a^3*d^2*sin(2*f*x + 2*e)/f + 3/8*(4*a^3*c^2
+ 10*a^3*c*d + 3*a^3*d^2)*x + 1/2*(2*a^3*c^2 + a^3*d^2)*x + 1/48*(4*a^3*c^2 + 24*a^3*c*d + 17*a^3*d^2)*cos(3*f
*x + 3*e)/f - 1/8*(30*a^3*c^2 + 36*a^3*c*d + 23*a^3*d^2)*cos(f*x + e)/f + 1/32*(2*a^3*c*d + 3*a^3*d^2)*sin(4*f
*x + 4*e)/f - 1/4*(3*a^3*c^2 + 8*a^3*c*d + 3*a^3*d^2)*sin(2*f*x + 2*e)/f

________________________________________________________________________________________

Mupad [B]
time = 8.36, size = 493, normalized size = 3.01 \begin {gather*} \frac {a^3\,\mathrm {atan}\left (\frac {a^3\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (20\,c^2+30\,c\,d+13\,d^2\right )}{4\,\left (5\,a^3\,c^2+\frac {15\,a^3\,c\,d}{2}+\frac {13\,a^3\,d^2}{4}\right )}\right )\,\left (20\,c^2+30\,c\,d+13\,d^2\right )}{4\,f}-\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (3\,a^3\,c^2+\frac {15\,a^3\,c\,d}{2}+\frac {13\,a^3\,d^2}{4}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9\,\left (3\,a^3\,c^2+\frac {15\,a^3\,c\,d}{2}+\frac {13\,a^3\,d^2}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (6\,a^3\,c^2+19\,a^3\,c\,d+\frac {25\,a^3\,d^2}{2}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,\left (6\,a^3\,c^2+19\,a^3\,c\,d+\frac {25\,a^3\,d^2}{2}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (28\,a^3\,c^2+40\,a^3\,c\,d+12\,a^3\,d^2\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {92\,a^3\,c^2}{3}+56\,a^3\,c\,d+\frac {76\,a^3\,d^2}{3}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (\frac {136\,a^3\,c^2}{3}+80\,a^3\,c\,d+\frac {116\,a^3\,d^2}{3}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (6\,a^3\,c^2+4\,d\,a^3\,c\right )+\frac {22\,a^3\,c^2}{3}+\frac {76\,a^3\,d^2}{15}+12\,a^3\,c\,d}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}+5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )}-\frac {a^3\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )-\frac {f\,x}{2}\right )\,\left (20\,c^2+30\,c\,d+13\,d^2\right )}{4\,f} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + a*sin(e + f*x))^3*(c + d*sin(e + f*x))^2,x)

[Out]

(a^3*atan((a^3*tan(e/2 + (f*x)/2)*(30*c*d + 20*c^2 + 13*d^2))/(4*(5*a^3*c^2 + (13*a^3*d^2)/4 + (15*a^3*c*d)/2)
))*(30*c*d + 20*c^2 + 13*d^2))/(4*f) - (tan(e/2 + (f*x)/2)*(3*a^3*c^2 + (13*a^3*d^2)/4 + (15*a^3*c*d)/2) - tan
(e/2 + (f*x)/2)^9*(3*a^3*c^2 + (13*a^3*d^2)/4 + (15*a^3*c*d)/2) + tan(e/2 + (f*x)/2)^3*(6*a^3*c^2 + (25*a^3*d^
2)/2 + 19*a^3*c*d) - tan(e/2 + (f*x)/2)^7*(6*a^3*c^2 + (25*a^3*d^2)/2 + 19*a^3*c*d) + tan(e/2 + (f*x)/2)^6*(28
*a^3*c^2 + 12*a^3*d^2 + 40*a^3*c*d) + tan(e/2 + (f*x)/2)^2*((92*a^3*c^2)/3 + (76*a^3*d^2)/3 + 56*a^3*c*d) + ta
n(e/2 + (f*x)/2)^4*((136*a^3*c^2)/3 + (116*a^3*d^2)/3 + 80*a^3*c*d) + tan(e/2 + (f*x)/2)^8*(6*a^3*c^2 + 4*a^3*
c*d) + (22*a^3*c^2)/3 + (76*a^3*d^2)/15 + 12*a^3*c*d)/(f*(5*tan(e/2 + (f*x)/2)^2 + 10*tan(e/2 + (f*x)/2)^4 + 1
0*tan(e/2 + (f*x)/2)^6 + 5*tan(e/2 + (f*x)/2)^8 + tan(e/2 + (f*x)/2)^10 + 1)) - (a^3*(atan(tan(e/2 + (f*x)/2))
 - (f*x)/2)*(30*c*d + 20*c^2 + 13*d^2))/(4*f)

________________________________________________________________________________________